import pymysql
db = pymysql.connect(
    host="localhost",
    port=3306,
    user="root",
    password="123456",
    charset="utf8"
)
cursor = db.cursor()
cursor.execute("use crawlerdemo")
sql = """create table if not exists job(
`job_id` int primary key auto_increment,
`job_name` varchar(40),
`job_sal` int,
`company_name` varchar(30),
`job_place` varchar(10),
`job_exp` varchar(10),
`job_education` varchar(10)
)
"""
cursor.execute(sql)
cursor.execute("show tables")
res = cursor.fetchall()
print(res)
cursor.close()
db.close()